#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @FileName  :demo_ecshop_cookie.py
# @Time      :2021/7/29 17:22
# @author    :Harry
import time
from selenium import webdriver

driver = webdriver.Chrome()
driver.maximize_window()

driver.get('http://192.168.1.241/hdshop/admin/index.php')
driver.implicitly_wait(30)

driver.add_cookie({'name':'ECSCP[admin_id]', 'value':'1'})
driver.add_cookie({'name':'ECSCP[admin_pass]', 'value':'fba1e86908f364f5fee205d14dc69ff7'})
# driver.add_cookie({'name':'ECS_LastCheckOrder', 'value':'Thu%2C%2029%20Jul%202021%2009%3A24%3A23%20GMT'})

# driver.refresh()
driver.get('http://192.168.1.241/hdshop/admin/index.php')

time.sleep(3)
driver.quit()